package com.ssm.service.impl;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssm.bean.StockRecord;
import com.ssm.dao.StockRecordQueryMapper;
import com.ssm.service.StockRecordQueryService;

@Service
public class StockRecordServiceImpl implements StockRecordQueryService {

	@Autowired
	public StockRecordQueryMapper stockRecordQueryMapper;
	
	@Override
	public int queryStockRecordCnt(StockRecord stockRecord) {
		return stockRecordQueryMapper.queryStockRecordCnt(stockRecord);
		
	}

	@Override
	public List<StockRecord> queryStockRecordByParam(Map<String, Object> params) {
		List<StockRecord> list = stockRecordQueryMapper.queryStockRecordByParam(params);
		if(!list.isEmpty() && list.size() > 0){
			return list;
		}
		return Collections.emptyList();
	}

}
